<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head id="MyHead">
    <script src="/resources/Scripts/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="/resources/Scripts/jquery.easyui.min-1.3.5.js" type="text/javascript"></script>
        <script src="/resources/Scripts/jquery.datagrid.js" type="text/javascript"></script>
    <script src="/resources/Scripts/JScriptIndex.js" type="text/javascript"></script>
    <link href="/resources/Content/Default.css" rel="stylesheet" type="text/css" />
    <link href="/resources/Content/IndexStyle.css" rel="stylesheet" type="text/css" />

        <link href="/resources/Res/easyui/themes/icon.css" rel="stylesheet" type="text/css" />
        <script src="/resources/Res/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <link href="/resources/Res/easyui/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <title>学员</title>
     <script type="text/javascript" language="javascript">
         $(function () {
             $.extend($.fn.datagrid.methods, {
                 addToolbarItem: function (jq, items) {
                     return jq.each(function () {
                         var dpanel = $(this).datagrid('getPanel');
                         var toolbar = dpanel.children("div.datagrid-toolbar");
                         if (!toolbar.length) {
                             toolbar = $("<div class=\"datagrid-toolbar\"><table cellspacing=\"0\" cellpadding=\"0\"><tr></tr></table></div>").prependTo(dpanel);
                             $(this).datagrid('resize');
                         }
                         var tr = toolbar.find("tr");
                         for (var i = 0; i < items.length; i++) {
                             var btn = items[i];
                             if (btn == "-") {
                                 $("<td><div class=\"datagrid-btn-separator\"></div></td>").appendTo(tr);
                             } else {
                                 var td = $("<td></td>").appendTo(tr);
                                 var b = $("<a href=\"javascript:void(0)\"></a>").appendTo(td);
                                 b[0].onclick = eval(btn.handler || function () { });
                                 b.linkbutton($.extend({}, btn, {
                                     plain: true
                                 }));
                             }
                         }
                     });
                 },
                 removeToolbarItem: function (jq, param) {
                     return jq.each(function () {
                         var dpanel = $(this).datagrid('getPanel');
                         var toolbar = dpanel.children("div.datagrid-toolbar");
                         var cbtn = null;
                         if (typeof param == "number") {
                             cbtn = toolbar.find("td").eq(param).find('span.l-btn-text');
                         } else if (typeof param == "string") {
                             cbtn = toolbar.find("span.l-btn-text:contains('" + param + "')");
                         }
                         if (cbtn && cbtn.length > 0) {
                             cbtn.closest('td').remove();
                             cbtn = null;
                         }
                     });
                 }
             });
         });
    </script>
    
    <script type="text/javascript" language="javascript">
        $(function () {
            $.ajax({
                type: "POST",
                url: '../S_Employees/getS_Employees/@zubieID=2014032215264490297860757751092',
                dataType: 'json',
                success: function (jsonstr) {
                    jsonstr.push({
                        'id': '',
                        'text': '请选择',
                        "selected": true
                    });
                    $("#sS_K2teacher").combobox({ data: jsonstr, valueField: 'id', textField: 'text' });
                    var data = $('#sS_K2teacher').combobox('getData');
                    if (data.length > 0) {
                        //$("#selectfpjl ").combobox('select', data[0].id);
                    }
                }
            });
            $.ajax({
                type: "POST",
                url: '../S_Employees/getS_Employees/@zubieID=2014032215264490297860757751092',
                dataType: 'json',
                success: function (jsonstr) {
                    jsonstr.push({
                        'id': '',
                        'text': '请选择',
                        "selected": true
                    });
                    $("#sS_K3teacher").combobox({ data: jsonstr, valueField: 'id', textField: 'text' });
                    var data = $('#sS_K3teacher').combobox('getData');
                    if (data.length > 0) {
                        //$("#selectfpjl ").combobox('select', data[0].id);
                    }
                }
            });
            $('#flexigridData').datagrid({
                //title: '学员', //列表的标题
                iconCls: 'icon-site',
                width: 'auto',
                height: 'auto',
                nowrap: true,
                striped: true,
                collapsible: true,
                pageSize: 5,//每页显示的记录条数，默认为10
                pageList: [2, 3, 4],//可以设置每页记录条数的列表
                url:'/zuoFeiStudent', //获取数据的url
                queryParams: {StuName:'success'},
                sortName: 'PK_ID',
                sortOrder: 'desc',
                //idField: 'PK_ID',
               // onDblClickRow: onDblClickRow,  
               
                singleSelect: true,
                toolbar: "#yesSearch",
                columns: [[
							{ field: 'stuId', title: '<label for="stuId">学员编号</label>', width: 70, sortable: true }
							, { field: 'stuName', title: '<label for="stuName">学员姓名</label>', width: 70, sortable: true }
							, { field: 'stuSex', title: '<label for="stuSex">性别</label>', width: 40, sortable: true }
							, { field: 'stuPhoto', title: '<label for="stuPhoto">照片</label>', width: 40, sortable: true}
							, { field: 'stuCardId', title: '<label for="stuCardId">身份证号</label>', width: 140, sortable: true }
							, { field: 'stuClassType', title: '<label for="stuClassType">班别</label>', width: 100, sortable: true }
							, { field: 'stuIsLocal', title: '<label for="stuIsLocal">是否本地</label>', width: 70, sortable: true }	
							, { field: 'stuNowLicence', title: '<label for="stuNowLicence">中止阶段</label>', width: 70, sortable: true }	
							, { field: 'stuPhone', title: '<label for="stuPhone">联系方式</label>', width: 90 ,sortable: true}
							, { field: 'stuApplyDate', title: '<label for="stuApplyDate">报名时间</label>', width: 90 ,sortable: true}
							, { field: 'stuApplicationType', title: '<label for="stuApplicationType">申请类型</label>', width: 60, sortable: true }
							, { field: 'stuShouldCharge', title: '<label for="stuShouldCharge">应收费用</label>', width: 60, sortable: true }
							, { field: 'stuCharge', title: '<label for="stuCharge">实收费用</label>', width: 60, sortable: true }
							, { field: 'stuMedicaHospital', title: '<label for="reOneSco">体检医院</label>', width: 95 ,sortable: true}
							, { field: 'stuWorkUnit', title: '<label for="reThreeSco">工作单位</label>', width: 95 ,sortable: true}
							, { field: 'stuAddress', title: '<label for="stuAddress">家庭住址</label>', width: 95 ,sortable: true}
							, { field: 'stuResidenceAddress', title: '<label for="stuResidenceAddress">居住地址</label>', width: 95,sortable: true}
							, { field: 'stuResidenceId', title: '<label for="stuResidenceId">居住证号</label>', width: 75 ,sortable: true}
							, { field: 'stuAssignsSchool', title: '<label for="stuAssignsSchool">报名分校</label>', width: 60, sortable: true }
							, { field: 'stuAssigns', title:'<label for="stuAssigns">报名点</label>', width: 60, sortable: true }
							, { field: 'stuAdmissions', title:'<label for="stuAdmissions">报名来源</label>', width: 60, sortable: true }
							, { field: 'stuReferees', title:'<label for="stuReferees">推荐人</label>', width: 60, sortable: true }
							/* ,{
							      field: 'operation', title: '操作', align: 'center', width: 120,
							      formatter: function (value, row, index) {
							          var str = "";
							          str += '<a href="javascript:update(\'' + Id + '\');" class="easyui-linkbutton c1" style="width:50px">修改</a>';                              
							          str += '<a href="javascript:view(\'' + Id + '\');" class="easyui-linkbutton c4" tyle="width:50px" >查看</a>';
							          str += '<a href="javascript:view(\'' + Id + '\');" class="easyui-linkbutton c5" tyle="width:50px">隐藏</a>';
							          return str;
							      }
							  } */

                ]],
                
                pagination: true,
                rownumbers: true
                

            });

           

            $("#yesfenxiao").combobox({ panelHeight: '240' });
            $("#yesfenxiao").combobox({
                editable: false,
                onSelect: function (record) {

                    $.ajax({
                        type: "POST",
                        url: '../SysPerson/getSelData/@table=StudentSource&colum=models&pid=' + record.value,
                        dataType: 'json',
                        success: function (jsonstr) {
                            // 修改ajax返回的值
                            jsonstr.push({
                                'id': '0',
                                'text': '全部',
                                "selected": true
                            });
                            $("#yesfendian").combobox({ data: jsonstr, panelHeight: 'auto', editable: false, valueField: 'id', textField: 'text' });
                        }
                    });
                }
            });


        });
        //重庆驾校

        function ArchivesPrinter() {



        }

        //////////////////////管理员回访
        function guanliyuanHuiFang() {
            var rows = $('#flexigridData').datagrid('getSelections');
            if (rows.length == 0) {
                $.messager.alert('操作提示', '请选择数据!', 'warning');
                return false;
            }
            if (rows.length > 1) {
                $.messager.alert('操作提示', '请选择一条数据!', 'warning');
                return false;
            }
            $('#guanliyuanHuiFang').dialog("open");
            $("#GLYHF_sid").val(rows[0].PK_ID);
            GLYHFList(rows[0].PK_ID);
        }

        function GLYHFList(sid) {
           
            $('#GLYHF_list').datagrid({
                iconCls: 'icon-site',
                width: 'auto',
                height: 'auto',
                nowrap: false,
                striped: true,
                collapsible: true,
                url: '../RemarkRecord/GetData', //获取数据的url
                queryParams: { search: 'r_sid&'+sid+'^r_module&moduleGLYHF^' },
                sortName: 'pk_id',
                sortOrder: 'desc',
                idField: 'pk_id',

                columns: [[


					{ field: 'r_content', title: '回访内容', width: 320 }
					, { field: 'CreateTime', title: '记录日期', width: 80
                    , formatter: function (value, rec) {
                        if (value) {
                            return dateConvert(value);
                        }
                    }
					}
					, { field: 'CreatePerson', title: '记录人', width: 80 }
                ]],
                pagination: true,
                rownumbers: true

            });
        }

        //备注查询
        function FindDataGLYHFHuiFang() {
            var search = "";
            var keyword = $("#GLYHFkeyword").val();
            var startTime = $("#GLYHFstartTime").val();
            var endTime = $("#GLYHFendTime").val();
            var r_sid = $("#GLYHF_sid").val();
            var r_module = $("#GLYHF_module").val();
            if (keyword != "") {
                search = "r_content&" + keyword + "^"
            }
            if (startTime != "") {
                search += "CreateTimeStart_Time&" + startTime + "^"
            }
            if (endTime != "") {
                search += "CreateTimeEnd_Time&" + endTime + "^"
            }
            if (r_sid != "") {
                search += "r_sid&" + r_sid + "^"
            }
            if (r_module != "") {
                search += "r_module&" + r_module + "^"
            }
           
            $('#GLYHF_list').datagrid('reload', { search: search });
        }
        $(function () {
            $("#GLYHFadd").click(function () {

                if ($("#GLYHF_content").val() == "") {
                    $.messager.alert('系统提示：', '请输入备注内容！', 'warning');
                    return false;
                }
                var dataval = "";
                var r_content = $("#GLYHF_content").val();
                var r_sid = $("#GLYHF_sid").val();
                var r_module = $("#GLYHF_module").val();
                dataval = "r_content=" + r_content + "&";
                dataval += "r_sid=" + r_sid + "&";
                dataval += "r_module=" + r_module;

                alert(dataval);

                $.messager.confirm('操作提示', "确认添加备注吗？", function (r) {
                    if (r) {

                        $.ajax({
                            url: "../RemarkRecord/Create",
                            type: "Post",
                            data: dataval,
                            dataType: "json",
                            success: function (data) {
                         

                                //$.messager.alert('系统提示：', '添加备注成功！', 'info');
                                $('#GLYHF_content').val('');
                                $('#GLYHF_list').datagrid('reload');
                            }
                        });

                    }
                });
            });
        });

        ////////////////管理员回访


        //选择性打印
        function SelPrintArea() {
               var SysMenuId = '2013030517065096875002a381ff7ab';
               var rows = $('#flexigridData').datagrid('getSelections');
               if (rows.length == 0) {
                   $.messager.confirm('操作提示', "尚未选择数据，是否打印当前页？", function (r) {
                       if (r) {
                           var grows = $('#flexigridData').datagrid('getRows');
                           //alert(grows.length);
                           for (var i = 0; i < grows.length; i++) {
                               $('#flexigridData').datagrid('selectRow', i);
                           }

                           var arr = [];
                           for (var i = 0; i < rows.length; i++) {
                               arr.push(rows[i].PK_ID);
                           }
                           var url = "../S_Ticket_List/StudentFilePrinter/0@pid=" + arr.join(",") + "&SysMenuId=" + SysMenuId + "&rd=" + Math.random();
                           window.parent.showIdWindow("打印管理", url, 800, 550, false, false, true);
                           $("#flexigridData").datagrid("clearSelections");

                       } else {

                           return false;
                       }

                   })
                  // $.messager.alert('操作提示', '请选择数据!', 'warning');
                   return false;
               }

               var arr = [];
               for (var i = 0; i < rows.length; i++) {
                   arr.push(rows[i].PK_ID);
               }

               var url = "../S_Ticket_List/StudentFilePrinter/0@pid=" + arr.join(",") + "&SysMenuId=" + SysMenuId + "&rd=" + Math.random();
               window.parent.showIdWindow("打印管理", url, 800, 550, false, false, true);
               $("#flexigridData").datagrid("clearSelections");

           }
           //打印



        var fieldSearchVal = "";

        // 查询下列菜单
        function fieldSearch(fieldName) {
            var rows = $('#flexigridData').datagrid('getSelections');
            if (rows.length == 0) {
                $.messager.alert('操作提示', '请选择数据!', 'warning');
                return false;
            }
            var idValue = "";
            switch (fieldName) {
                case "S_NO":
                    idValue = rows[0].S_NO;
                    break;
                case "S_name":
                    idValue = rows[0].S_name;

                    break;
                case "S_cardno":
                    idValue = rows[0].S_cardno;
                    break;
                case "S_sex":
                    idValue = rows[0].S_sex;
                    break;
                case "FK_Carid":
                    $.ajax({
                        type: "post",
                        url: "../S_Student/GetFileVal",
                        data: { query: rows[0].PK_ID, Fname: "FK_Carid" },
                        async: false,
                        success: function (res) {
                            //data = eval("(" + res + ")"); 
                            idValue = res;
                        }
                    });
                    break;
                case "S_mob":
                    idValue = rows[0].S_mob;
                    break;
                case "FK_DIC_from": //来源
                    $.ajax({
                        type: "post",
                        url: "../S_Student/GetFileVal",
                        data: { query: rows[0].PK_ID, Fname: "FK_DIC_from" },
                        async: false,
                        success: function (res) {
                            //data = eval("(" + res + ")"); 
                            idValue = res;
                        }
                    });
                    break;
                default:
                    idValue = "";
            }
            if (fieldSearchVal.indexOf(fieldName) < 0) {

            } else {
                var position = fieldSearchVal.indexOf(fieldName) - fieldName.length; //定位
                var positionStr = fieldSearchVal.substring(position);
                var Pstr = positionStr.indexOf("^") + 1;

                var positionVal = positionStr.substring(0, Pstr);
                fieldSearchVal = fieldSearchVal.replace(positionVal, "");
            }

            fieldSearchVal = fieldSearchVal + fieldName + "&" + $('<p>' + idValue + '</p>').text() + "^";

            //alert(fieldSearchVal);
            var search = fieldSearchVal;
            //执行查询                        
            $('#flexigridData').datagrid('reload', { search: search });
        }

        
        //退学
        function DropSchool() {
            var arr = $('#flexigridData').datagrid('getSelections');

            if (arr.length == 1) {
                //window.location.href = "../S_Should/ShouldList/" + arr[0].PK_ID;
                window.parent.showMyWindow("退学管理", "../S_App/DropSchool/" + arr[0].PK_ID + "?rd=" + Math.random(), 800, 600, true, false, true);

            } else {
                $.messager.alert('操作提示', '请选择一条数据!', 'warning');
            }
            return false;
        }
        //费用管理
        function S_Should() {


            var arr = $('#flexigridData').datagrid('getSelections');

            if (arr.length == 1) {
                //window.location.href = "../S_Should/ShouldList/" + arr[0].PK_ID;
                window.parent.showMyWindow("学员费用明细", "../S_Should/ShouldList/" + arr[0].PK_ID + "?rd=" + Math.random(), 800, 600, true, false, true);

            } else {
                $.messager.alert('操作提示', '请选择一条数据!', 'warning');
            }
            return false;
        }



        //导航到查看详细的按钮
        function getView() {

            var arr = $('#flexigridData').datagrid('getSelections');

            if (arr.length == 1) {
                window.location.href = "../S_Student/Details/" + arr[0].PK_ID;

            } else {
                $.messager.alert('操作提示', '请选择一条数据!', 'warning');
            }
            return false;
        }



       

        
        //内部学员查询
        function FindData() {
        	
            var str="yes";           
            var StuNumber = document.getElementById(str +"StuNumber").value; //关键字
            var StuName = document.getElementById(str + "StuName").value; //关键字
            var RecoderNumber = document.getElementById(str + "RecoderNumber").value; //关键字
            var CardId = document.getElementById(str + "CardId").value; //关键字
            var Class = document.getElementById(str + "Class").value; //关键字
            var regdateStartTime = document.getElementById(str + "S_regdateStart_Time").value; //关键字
            var regdateEndTime = document.getElementById(str + "S_regdateEnd_Time").value; //关键字
            var CarType = document.getElementById(str + "CarType").value; //关键字         
             
            //  alert(StuNumber+',1'+StuName+RecoderNumber+CardId+Class+CarType+regdateStartTime+regdateEndTime);
            $('#flexigridData').datagrid('reload', {StuNumber:StuNumber,StuName:StuName,RecoderNumber:RecoderNumber,CardId:CardId,Class:Class,CarType:CarType,regdateStartTime:regdateStartTime,regdateEndTime:regdateEndTime});
        }

        //作废还原
         function studentRestore() {
        	//alert('123');
            var rows = $('#flexigridData').datagrid('getSelections');
            if (rows.length != 1) {
                $.messager.alert('操作提示', '请选择一条数据!', 'warning');
                return false;
            }
            
            $.messager.confirm('作废学员还原', '您确定要作废该学员吗？', function(r){
        		if (r){
        	           $('#flexigridData').datagrid('reload', {StuName:'restore',StuNumber:rows[0].stuId});
        		}
        	});    
        }
        
        function flexiArchives() {
        	//alert('123');
            var rows = $('#flexigridData').datagrid('getSelections');
            if (rows.length != 1) {
                $.messager.alert('操作提示', '请选择一条数据!', 'warning');
                return false;
            }
            parent.addTab("档案:" + rows[0].S_name, "IndexNew/" + rows[0].PK_ID + "?rd=" + Math.random(), "tu1001", true, rows[0].PK_ID);
        }
        function onDblClickRow(rowIndex, rowData) {
            //var selected = $("#flexigridData").datagrid('getSelections'); //获取所有行集合对象
            //var obj = selected[rowIndex]; //index为当前右键行的索引，指向当前行对象
            parent.addTab("档案:" + rowData["S_name"], "IndexNew/" + rowData["PK_ID"], "tu1001", true, rowData["PK_ID"]);
        }

        ///2014-08-01
        function xuanzedayin(type_) {
            $('#xuanzedayin').dialog({
                buttons: [{
                    text: '确定',
                    iconCls: 'icon-ok',
                    handler: function () {
                        var fields = "";
                        var titles = "";
                        // var field = ['SSID', 'S_arNO', 'FK_SSID', 'S_Carmodels', 'S_mob', 'S_tel', 'S_fadd', 'S_cardno', 'S_tuijianren', 'S_remark', 'FK_DIC_from']; //所有的列名
                        //var title = ['序号', '档案编号', '姓名', '车型', '手机号', '电话号', '身份证地址', '身份证号', '推荐人', '备注', '报名来源']; //所有的标题名称

                        if ($("#xueyuanbianhao_").attr("checked")) {
                            fields += ",'S_NO'";
                            titles += ",'学员编号'";
                        }
                        if ($("#xueyuankahao_").attr("checked")) {
                            fields += ",'S_ArNO'";
                            titles += ",'档案编号'";
                        }
                        if ($("#xingming_").attr("checked")) {
                            fields += ",'S_name'";
                            titles += ",'姓名'";
                        }
                        if ($("#xingbie_").attr("checked")) {
                            fields += ",'S_sex'";
                            titles += ",'性别'";
                        }
                        if ($("#shenfenzhenghao_").attr("checked")) {
                            fields += ",'S_cardno'";
                            titles += ",'身份证号'";
                        }
                        if ($("#banbie_").attr("checked")) {
                            fields += ",'FK_Carid'";
                            titles += ",'班别'";
                        }
                        if ($("#baomingfenxiao_").attr("checked")) {
                            fields += ",'FK_DIC_from'";
                            titles += ",'报名分校'";
                        }
                        if ($("#keyixueshi_").attr("checked")) {
                            fields += ",'S_SubjectAhours'";
                            titles += ",'科一学时'";
                        }
                        if ($("#keerxueshi_").attr("checked")) {
                            fields += ",'S_SubjectBhours'";
                            titles += ",'科二学时'";
                        }
                        if ($("#kesanxueshi_").attr("checked")) {
                            fields += ",'S_SubjectChours'";
                            titles += ",'科三学时'";
                        }
                        if ($("#kesixueshi_").attr("checked")) {
                            fields += ",'S_SubjectDhours'";
                            titles += ",'科四学时'";
                        }
                        if ($("#qishu_").attr("checked")) {
                            fields += ",'S_periodNum'";
                            titles += ",'期数'";
                        }
                        if ($("#tijian_").attr("checked")) {
                            fields += ",'S_IsMedical'";
                            titles += ",'体检'";
                        }
                        if ($("#danganshouli_").attr("checked")) {
                            fields += ",'S_IsFileToSccept'";
                            titles += ",'档案受理'";
                        }
                        if ($("#jiatingzhuzhi_").attr("checked")) {
                            fields += ",'S_fadd'";
                            titles += ",'家庭住址'";
                        }
                        if ($("#S_K2teacher").attr("checked")) {
                            fields += ",'S_K2teacher'";
                            titles += ",'科二教练'";
                        }
                        if ($("#k2fenchedate").attr("checked")) {
                            fields += ",'k2fenchedate'";
                            titles += ",'科二分车时间'";
                        }
                        if ($("#S_K3teacher").attr("checked")) {
                            fields += ",'S_K3teacher'";
                            titles += ",'科三教练'";
                        }
                        if ($("#k3fenchedate").attr("checked")) {
                            fields += ",'k3fenchedate'";
                            titles += ",'科三分车时间'";
                        }

                        if ($("#juzhuzhengdizhi_").attr("checked")) {
                            fields += ",'S_hadd'";
                            titles += ",'居住证地址'";
                        }
                        if ($("#dianhua_").attr("checked")) {
                            fields += ",'S_tel'";
                            titles += ",'电话'";
                        }
                        if ($("#shouji_").attr("checked")) {
                            fields += ",'S_mob'";
                            titles += ",'手机'";
                        }
                        if ($("#email_").attr("checked")) {
                            fields += ",'S_email'";
                            titles += ",'email'";
                        }
                        if ($("#youxiaoqi_").attr("checked")) {
                            fields += ",'S_Period'";
                            titles += ",'有效期'";
                        }
                        if ($("#kaishiriqi_").attr("checked")) {
                            fields += ",'S_Perdate'";
                            titles += ",'开始日期'";
                        }
                        if ($("#baomingriqi_").attr("checked")) {
                            fields += ",'S_regdate'";
                            titles += ",'报名日期'";
                        }
                        if ($("#xueyuanleixing_").attr("checked")) {
                            fields += ",'FK_DIC_Stype'";
                            titles += ",'学员类型'";
                        }
                        if ($("#biaoqian_").attr("checked")) {
                            fields += ",'S_tag'";
                            titles += ",'标签'";
                        }
                        if ($("#zixun_").attr("checked")) {
                            fields += ",'FK_SA_id'";
                            titles += ",'咨询'";
                        }
                        if ($("#lixiaoriqi_").attr("checked")) {
                            fields += ",'S_Ldate'";
                            titles += ",'离校日期'";
                        }
                        if ($("#zhuangtai_").attr("checked")) {
                            fields += ",'FK_DIC_Start'";
                            titles += ",'状态'";
                        }
                        if ($("#shenheren_").attr("checked")) {
                            fields += ",'S_ConfirmUID'";
                            titles += ",'审核人'";
                        }

                        if ($("#shenheriqi_").attr("checked")) {
                            fields += ",'S_ConfirmDate'";
                            titles += ",'审核日期'";
                        }
                        if ($("#beizhu_").attr("checked")) {
                            fields += ",'S_Remark'";
                            titles += ",'备注'";
                        }



                        $("#fields_").val(fields);
                        $("#titles_").val(titles);
                        // alert(type_)
                        if (type_ == "1") {

                            flexiExport();
                        }

                        $('#xuanzedayin').dialog("close");
                    }
                },
                     {
                         text: '取消',
                         iconCls: 'icon-cancel',
                         handler: function () {
                             $('#xuanzedayin').dialog("close");
                         }
                     }]
            });
            $('#xuanzedayin').dialog("open");
        };




        
            //“导出EXCEL”按钮     在6.0版本中修改
        function flexiExport() {
        	$.messager.confirm('导出Excel', '您确定要导出学员信息的Excel表格吗？', function(r){
        		if (r){
        			window.location.href = '/exportZuoFeiStudent';
        		}
        	});
            
        }                       
        function progress() {
            var win = $.messager.progress({
                title: '请等待',
                text: '数据正在处理中'
            });
        }
        //js过滤HTML标签以及空格
        function removeHTMLTag(str) {
            str = str.replace(/<\/?[^>]*>/g, ''); //去除HTML tag
            str = str.replace(/[ | ]*\n/g, '\n'); //去除行尾空白
            //str = str.replace(/\n[\s| | ]*\r/g,'\n'); //去除多余空行
            str = str.replace(/ /ig, ''); //去掉 
            return str;
        }

    </script>
    <script src="/resources/Res/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <base target = "_self">
</head>
<body class="easyui-layout" style="padding:3px;">
    <table id="flexigridData" fit="true">
    </table>
    
    <div id="xuanzedayin" title="选择导出列" class="easyui-dialog" style="width: 400px; height: 500px;
        padding-top: 8px;" closed="true" modal="false" iconcls="icon-search">
        <table>
        <tr>
        <td>
       <input onclick="selectAll()" type="checkbox"   name="controlAll" id="controlAll" />全部选择<br>
        <input name="selectedprint" id="xueyuanbianhao_" type="checkbox" value="1" />学员编号<br>
        <input name="selectedprint" id="xueyuankahao_" type="checkbox" value="1" />档案编号<br>
        <input name="selectedprint" id="xingming_" type="checkbox" value="1" />姓名<br>
        <input name="selectedprint" id="xingbie_" type="checkbox" value="1" />性别<br>
        <input name="selectedprint" id="shenfenzhenghao_" type="checkbox" value="1" />身份证号<br>
        <input name="selectedprint" id="banbie_" type="checkbox" value="1" />班别<br>
        <input name="selectedprint" id="baomingfenxiao_" type="checkbox" value="1" />报名分校<br>
        <input name="selectedprint" id="keyixueshi_" type="checkbox" value="1" />科一学时<br>
        <input name="selectedprint" id="keerxueshi_" type="checkbox" value="1" />科二学时<br>
        <input name="selectedprint" id="kesanxueshi_" type="checkbox" value="1" />科三学时<br>
        <input name="selectedprint" id="kesixueshi_" type="checkbox" value="1" />科四学时<br>
        <input name="selectedprint" id="qishu_" type="checkbox" value="1" />期数<br>
        <input name="selectedprint" id="tijian_" type="checkbox" value="1" />体检<br>
        <input name="selectedprint" id="danganshouli_" type="checkbox" value="1" />档案受理<br>
        <input name="selectedprint" id="jiatingzhuzhi_" type="checkbox" value="1" />家庭住址<br>
              <input name="selectedprint" id="S_K2teacher" type="checkbox" value="1" />科二教练<br>
              <input name="selectedprint" id="k2fenchedate" type="checkbox" value="1" />科二分车时间<br>
              <input name="selectedprint" id="S_K3teacher" type="checkbox" value="1" />科三教练<br>
              <input name="selectedprint" id="k3fenchedate" type="checkbox" value="1" />科三分车时间<br>
        <input name="selectedprint" id="juzhuzhengdizhi_" type="checkbox" value="1" />居住证地址<br>
        <input name="selectedprint" id="dianhua_" type="checkbox" value="1" />电话<br>
        <input name="selectedprint" id="shouji_" type="checkbox" value="1" />手机<br>
        <input name="selectedprint" id="email_" type="checkbox" value="1" />email<br>
        <input name="selectedprint" id="youxiaoqi_" type="checkbox" value="1" />有效期<br>
        <input name="selectedprint" id="kaishiriqi_" type="checkbox" value="1" />开始日期<br>
        <input name="selectedprint" id="baomingriqi_" type="checkbox" value="1" />报名日期<br>
        <input name="selectedprint" id="xueyuanleixing_" type="checkbox" value="1" />学员类型<br>
        <input name="selectedprint" id="biaoqian_" type="checkbox" value="1" />标签<br>
        <input name="selectedprint" id="zixun_" type="checkbox" value="1" />咨询<br>
        <input name="selectedprint" id="lixiaoriqi_" type="checkbox" value="1" />离校日期<br>
        <input name="selectedprint" id="zhuangtai_" type="checkbox" value="1" />状态<br>
        <input name="selectedprint" id="shenheren_" type="checkbox" value="1" />审核人<br>
        <input name="selectedprint" id="shenheriqi_" type="checkbox" value="1" />审核日期<br>
        <input name="selectedprint" id="beizhu_" type="checkbox" value="1" />备注<br>

        <input name="fields_" id="fields_" value="" type="hidden"/><br>
        <input name="titles_" id="titles_" value="" type="hidden" />
        </td>
        </tr>
        </table>
    </div>
    <script src="/resources/Scripts/newadd.js" type="text/javascript"></script>



    <div id="yesSearch" style="padding:5px;height:auto">
        <div>
            学员编号: <input class="input-textbox" id="yesStuNumber" style="width:70px"/>&nbsp;&nbsp;
            学员姓名: <input class="input-textbox" id="yesStuName" style="width:70px"/>&nbsp;&nbsp;
            当前阶段: <input class="input-textbox" id="yesRecoderNumber" style="width:70px"/>&nbsp;&nbsp;
            身份证号: <input class="input-textbox" id="yesCardId" style="width:70px"/>&nbsp;&nbsp;
            班别: <input class="input-textbox" id="yesClass" style="width:70px"/>&nbsp;&nbsp;  
            准驾车型: <input class="input-textbox" id="yesCarType" style="width:70px"/>&nbsp;&nbsp; 
            报名日期：&nbsp;<input type="text" class="input-textbox" style="width:70px" id="yesS_regdateStart_Time" onclick="WdatePicker({maxDate:'#F{$dp.$D(\'yesS_regdateStart_Time\');}'})"  />
             <span>到</span>
            <input type="text" class="input-textbox" style="width:70px" id="yesS_regdateEnd_Time" onclick="WdatePicker({minDate:'#F{$dp.$D(\'yesS_regdateEnd_Time\');}'})" />
        </div>
        <div style="height: 10px"></div>
        <div>
        <a href="#" onclick="FindData();" class="easyui-linkbutton" iconCls="icon-search">查询</a>
           <a href="#" class="easyui-linkbutton" iconCls="icon-edit" onclick='studentRestore();'>作废还原</a>
           <a href="#" class="easyui-linkbutton" iconCls="icon-redo" onclick='flexiExport();'>导出EXCEL</a>      
        </div>
    </div>


    
    <div id="guanliyuanHuiFang" class="easyui-dialog" title=" 回访记录" closed="true"  collapsible="false" minimizable="false" maximizable="false" modal="true" data-options="iconCls:'icon-save'" style="width:640px;height:460px;padding:5px;">
       <style type="text/css">
    .line{ clear:both;  overflow:hidden;zoom:1;}
    .editor-label{ width:60px; text-align:left; float:left; height:26px; padding-left:4px;}
    .editor-field{ width:320px; text-align:left; float:left; height:26px; padding-top:4px; margin-right:16px;}
    .blueline{ border-bottom:#95b8e7 1px solid; margin-bottom:10px; padding-bottom:10px;}
    .height80{ height:80px; line-height:80px;}
    .TextArea{ width:320px; height:60px;border:#95b8e7 1px solid;}
    .editor-field input,.input-textbox{border:#95b8e7 1px solid; line-height:18px;}
    .stupic{ position:absolute; top:40px; left:264px;}
 </style>
        <div class="easyui-layout" data-options="fit:true">
           <div data-options="region:'North'" style="height:80px">
                <form id="GLYHFform" method="post">
                <input type="hidden" id="GLYHF_module" name="GLYHF_module" value="moduleGLYHF" />
                <input type="hidden" id="GLYHF_sid" name="GLYHF_sid" value="" />
                <div class="line">     
                <div class="editor-label height80">
                    回访内容
                </div>
                <div class="editor-field height80">
                    <textarea class="TextArea" cols="20" id="GLYHF_content" name="GLYHF_content" rows="2"></textarea>
                </div>
                <a href="#" id="GLYHFadd" class="easyui-linkbutton" style=" float:left; margin-top:25px;" data-options="iconCls:'icon-add',toggle:false">添加回访</a>
                </div>
                
           </div>
            <div data-options="region:'south,border:false,'" style=" height:330px;">
                <table id="GLYHF_list" class="easyui-datagrid" fit="true" toolbar="#GLYHFsearchtool">
                         
                </table>
            </div>
            </form>
        </div>
    </div>
    
    <div id="GLYHFsearchtool" style="padding:5px"> 
        <span>&nbsp;关键字：</span><input class="input-textbox" type="text" id="GLYHFkeyword" value="" size="10" /> 
        <span>&nbsp;记录时间：</span><input class="input-textbox" type="text" id="GLYHFstartTime" value="" onclick = "WdatePicker()" size="10" /> 到 <input class="input-textbox" type="text" onclick = "WdatePicker()" id="GLYHFendTime" value="" size="10" /> 
            &nbsp;<a href="javascript:FindDataGLYHFHuiFang();" class="easyui-linkbutton" data-options="iconCls:'icon-search'">查询</a> 
    </div>
  


        

</body>
</html>
